<template>
    <el-table :data="props.tableData" class="zs-tabel-page-main-no-footer" :stripe="true">
        <el-table-column type="index" label="序号" width="60" :align="'center'" />
        <el-table-column prop="projectName" label="项目" :align="'left'" width="260" />
        <el-table-column prop="bizType" label="业态" :align="'center'" width="100" >
            <template #default="scope">
                {{ getDictLabel(dictObj['PROJECT_COMMERCIAL_ACTIVITIES'], scope.row.bizType) }}
            </template>
        </el-table-column>
        <el-table-column prop="phase" label="阶段" :align="'center'" width="120" >
            <template #default="scope">
                {{ getDictLabel(dictObj['PROJECT_STAGE'], scope.row.phase) }}
            </template>
        </el-table-column>
        <el-table-column label="集团" :align="'center'" width="100" >
            <template #default="scope">
                {{ getDictLabel(dictObj['INVESTOR'], scope.row.investor) }}
            </template>
        </el-table-column>
        <el-table-column prop="city" label="城市" :align="'center'" width="100" >
            <template #default="scope">
                {{ getCityLabel(scope.row.city) }}
            </template>
        </el-table-column>
        <el-table-column label="意向率" :align="'right'">
            <template #default="scope">
                <span :class="{ 'zs-text-orange': scope.row.startingColorLab == '2' }">{{ scope.row.flowDay }}%</span>
            </template>
        </el-table-column>
        <el-table-column label="出租率" :align="'right'">
            <template #default="scope">
                <span :class="{ 'zs-text-orange': scope.row.rentalColorLab == '2' }">{{ scope.row.saleDay }}%</span>
            </template>
        </el-table-column>
        <el-table-column label="基准价达成" :align="'right'">
            <template #default="scope">
                {{ scope.row.rentalRate }}%
            </template>
        </el-table-column>
        <el-table-column label="操作" width="150" :align="'right'">
            <template #default="scope">
                <el-button class="zs-link" link size="small" @click="goPage(scope.row)">查看</el-button>
            </template>
        </el-table-column>
    </el-table>
    <!-- <div class="zs-text-gray-dark zs-text-sm zs-space-top">*销售额：万元；客流量：万人次</div> -->
</template>

<script setup>
// import { toThousands } from '@/utils/number-util'
import { getDictLabel, getCityLabel } from '@/utils/dbUtil'
import { useStore } from 'vuex'
import { useRouter } from 'vue-router'
const router = useRouter()
let store = useStore()
const dictObj = store.getters.getDictObj(["INVESTOR", "PROJECT_STAGE", "PROJECT_COMMERCIAL_ACTIVITIES"]);

const props = defineProps({
    updateDate: {
        type: String,
        required: false,
    },
    tabPermi: {
        type: String,
        required: false,
    },
    tableData: {
        type: Array,
        required: false,
    },
    pageSize: {
        type: Number,
        required: false,
    },
    pageNumber: {
        type: Number,
        required: false,
    }
})

const goPage = (row) => {
    router.push({
        path: '/page/routeController/index',
        query: {
            rid: 'page_901_choubeishangye_xiangqing',
            rTitle: '筹备-商业项目详情',
            biProjectCode: row.biProjectCode,
            projectCode: row.projectCode,
            updateDate: props.updateDate,
            tabPermi: props.tabPermi,
        },
    })
}

</script>

<style scoped lang="scss"></style>
